<?php

namespace app\controller;

use think\facade\Db;
use support\Request;

class Index
{
    public function index(Request $request)
    {
        $user = Db::table('document_yongan_sdk')->where('id', 1)->cache(true)->find();
        // Cache::set('user', $user);  
        // var_dump( Cache::get('user'));
        return json($user);
        // return response('hello webman');
    }

    public function view(Request $request)
    {
        return view('index/view', ['name' => 'webman']);
    }

    public function json(Request $request)
    {
        return json(['code' => 0, 'msg' => 'ok']);
    }

}
